<?php
/**
 * nmyx_activeprivty模块微站定义
 *
 * @author 三只小猴拓客
 * @url 
 */
defined('IN_IA') or exit('Access Denied');

class Nmyx_activeprivtyModuleSite extends WeModuleSite {




}

  

  function aurl($params = [] , $eid = false){

           global $_W,$_GPC;

           if(is_string($params) || is_numeric($params)){

                $params = ['et' => $params];
           }


           $params = array_merge([
                       
                       'eid' => $eid ?: $_GPC['eid'],
                       'version_id' => $_GPC['version_id']
           ],$params);

           return url('site/entry' , $params);

  }


  function model($name) {
    global $_W;

    static $model = [];
    static $loadCommonModel = false;
    $class = $name.'Model';

    if(!$model[$name]) {

        if(!$loadCommonModel) {
            include IA_ROOT ."/addons/{$_W['modulename']}/inc/model/CommonModel.class.php";
            $loadCommonModel = true;
        }

        include IA_ROOT ."/addons/{$_W['modulename']}/inc/model/{$class}.class.php";

        $model[$name] = new $class();
    }

    return $model[$name];

}
